<template>
	<view class="container">
		<swiper :indicator-dots="true" :autoplay="true" :interval="1000" :duration="1000">
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/school1.jpg" mode="" style="width: 100%;height: 240px"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/school2.jpg" mode="" style="width: 100%;height: 240px;"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/school3.jpg" mode="" style="width: 100%;height: 240px;"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/school4.jpg" mode="" style="width: 100%;height: 240px;"></image>
				</view>
			</swiper-item>
		</swiper>
		<uni-section title="列表功能" sub-title="" type="">
			<uni-grid :column="5">
				<uni-grid-item v-for="(item,index) in list">
					<view class="item-container"
						style="display: flex;flex-direction: column;align-items: center;justify-content: space-around;">
						<image :src="'../../static'+item.icon" mode="widthFix" style="width: 80rpx;"></image>
						<view class="typename">
							{{item.typename}}
						</view>
					</view>
				</uni-grid-item>
			</uni-grid>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						"id": 1,
						"typename": "新闻",
						"icon": "/news.png"
					},
					{
						"id": 2,
						"typename": "公告",
						"icon": "/announcement.png"
					},
					{
						"id": 3,
						"typename": "同学",
						"icon": "/classmate.png"
					},
					{
						"id": 4,
						"typename": "电话",
						"icon": "/telephone.png"
					},
					{
						"id": 5,
						"typename": "留言",
						"icon": "/leaveword.png"
					}
				]
			}
		},
		onLoad() {},
		methods: {},
	}
</script>

<style>

</style>